<template>
  <div class="ac-wrap">
    <listItem  v-for="(item, index) in list" :index="index" :item="item" :key="index"/>
  </div>
</template>

<script>
import listItem from '~/components/listItem.vue'
export default {
  layout: 'loginlayouts',
  async fetch({store}) {
    await store.commit('setIndex', 1)
  },
  async asyncData() {
  },
  components: {
    listItem,
  },
  data() {
    return {
      list: []
    }
  },
  methods:{
    activityList(){
      let params={
        pageSize:10,
        pageNum:1
      }
      this.$axios.$post('activityList',params).then(res => {
        if(res.status === 200 ){
          this.list = res.obj.list
        }
      })
    }
  },
  mounted(){
    this.activityList()
  }
}
</script>

<style scoped>
  .ac-wrap {
    width: 1200px;
    margin: 0 auto 20px auto;
  }
</style>
